package lesson12;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;

public class Test02 {
    public static void main(String[] args) {
        ArrayList<Student> list = new ArrayList();
        list.add(new Student("张飞",20,"男"));
        list.add(new Student("关羽",21,"男"));
        list.add(new Student("刘备",22,"男"));
        list.add(new Student("曹操",23,"男"));
        list.add(new Student("夏侯惇",24,"男"));

        Student stu = list.get(0);

        for(int i = 0;i < list.size();i++){
            System.out.println(list.get(i).getName());
        }
//
        for(Student s : list){
            System.out.println(s.getName());
        }

        HashSet<String> st = new HashSet();
        HashMap<String,Student> map = new HashMap();
        map.put("1",new Student("小强",20,"男"));
        Student s= map.get("1");

        SuperArray<Student> superArray = new SuperArray();
        superArray.add(new Student("小强",20,"男"));
        Student student = superArray.get(0);
        System.out.println(student.getName());
    }
}
